from kafka import KafkaConsumer

consumer = KafkaConsumer('test_monitor_tendency', group_id='test_monitor_tendency_tendency2kfk', bootstrap_servers=['hadoop000:9092'])
for msg in consumer:
    print(msg)
